<?php

namespace App\Http\Controllers\Backend;


use App\Manage\OrderManage;

class OrderController extends BaseController
{
    // 会员管理
    public function initialize()
    {
        parent::initialize();

        $this->model = 'Order';
    }

    // 支付（后台不能支付）
    public function onPay()
    {
        $manage = new OrderManage();
        $result = $manage->onPay();
        if($result === false){
            return $this->error($manage->getError());
        }

        return $this->success([], '支付成功！');
    }

    // 确认退款
    public function confirmRefund()
    {
        $manage = new OrderManage();
        $result = $manage->confirmRefund();
        if($result === false){
            return $this->error($manage->getError());
        }

        return $this->success([], '确认退款成功！');
    }


}


